From: Florian Müllner Date: Fri, 23 May 2025 20:15:13 +0000 (+0200) Subject: extensionSystem: Catch errors when removing extension update X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~124^2^2~87 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6b8a2e6d917e970dd3e130a2045068b47e38b047;p=gnome-shell.git extensionSystem: Catch errors when removing extension update We want to remove the temporary folder independently from whether the update succeeded or failed, so we currently remove it from a `finally` statement. Unfortunately that operation can fail as well, in which case we don't catch it and the exception interferes with startup. Fix this by removing the folder in a separate catch statement instead. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8417 Part-of: --- diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js index f12ee07a3..4f253f04e 100644 --- a/js/ui/extensionSystem.js +++ b/js/ui/extensionSystem.js @@ -669,8 +669,12 @@ export class ExtensionManager extends Signals.EventEmitter { FileUtils.recursivelyMoveDir(dir, extensionDir); } catch { log(`Failed to install extension updates for ${uuid}`); - } finally { + } + + try { FileUtils.recursivelyDeleteDir(dir, true); + } catch (e) { + console.error(`Failed to delete extension update: ${e.message}`); } } }